

package com.kimo.shop.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.kimo.shop.bean.model.RetailProd;
import com.kimo.shop.bean.param.RetailProdExportParam;
import com.kimo.shop.bean.param.RetailProdParam;
import com.kimo.shop.common.util.PageParam;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 *
 *
 * @author kimo-taozhouchuan
 * @date 2020-08-24 15:18:35
 */
public interface RetailProdMapper extends BaseMapper<RetailProd> {


    IPage<RetailProd> getPage(PageParam<RetailProd> page, @Param("retailProd") RetailProd retailProd);

    void removeRetainProdByIds(@Param("ids") Long[] ids, @Param("shopId") Long shopId);

    int countBarCode(@Param("barCode") String barCode);

    int countBarCodeAndId(@Param("barCode") String barCode, @Param("retailProdId") Long retailProdId);

    RetailProd getInfo(@Param("retailProdId") Long retailProdId);

    List<RetailProdParam> getBySkuId(@Param("skuId") Long skuId);

    int updateStocks(@Param("retailProd") RetailProd retailProd);

    int returnStocks(@Param("retailProdId") Long retailProdId, @Param("num") Integer num);

    List<RetailProdExportParam> selectByParam(@Param("retailProd") RetailProd retailProd);
}
